package com.lemon.system.controller;

import com.lemon.core.web.Result;
import com.lemon.system.po.MenuPO;
import com.lemon.system.service.IMenuService;
import com.lemon.system.dto.MenuDTO;

import javax.annotation.Resource;

import com.lemon.system.vo.RouteVO;
import lombok.extern.log4j.Log4j2;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.lemon.mybatisplus.base.BaseController;

import java.util.List;

/**
 * 菜单表控制层
 *
 * @author 李猛
 * @since 2024-02-11
 */
@Log4j2
@RestController
@RequestMapping("menu")
public class MenuController extends BaseController<MenuPO, MenuDTO, IMenuService> {
    @Resource
    private IMenuService iMenuService;

    /**
     * 查询路由
     *
     * @return
     */
    @GetMapping("getRoutes")
    public Result<List<RouteVO>> getRoutes() {
        return iMenuService.getRoutes();
    }
}